<div class="row-fluid">
	<div class="span12">
		<h3>Listar Menus</h3>
	</div>
</div>

<div class="row-fluid">
	<div class="span12">
		<%= link_to 'Adicionar Novo', new_menu_path, :class => "btn" %>
	</div>
</div>

<div class="row-fluid">
	<div class="span12">

		<% if !@menus.empty? %>
		<table class="table table-striped table-hover">
			<thead>
				<tr>
					<th>Nome</th>
					<th>Ativo</th>
					<th>Ações</th>
				</tr>
			</thead>
			<tbody>

				<% @menus.each do |menu| %>
				<tr>
					<td><%= menu.nome %></td>
					<td><%= menu.ativo ? "Sim" : "Não" %></td>
					<td><%= link_to 'Exibir', menu, :class => "btn" %>
					<%= link_to 'Editar', edit_menu_path(menu), :class => "btn" %>
					<%= link_to 'Excluir', menu, method: :delete, data: { confirm: 'Confirma a exclusão?' }, :class => "btn" %></td>
				</tr>
				<% end %>

			</tbody>
		</table>
		<% end %>
	</div>
</div>

